Skip to content

Feature/ab#2252 implement pull to zero in times of no activity#113

Merged
flonix8 merged 3 commits into
mainfrom
feature/AB#2252-implement-pull-to-zero-in-times-of-no-activity
Jun 19, 2026
Merged

Feature/ab#2252 implement pull to zero in times of no activity#113
flonix8 merged 3 commits into
mainfrom
feature/AB#2252-implement-pull-to-zero-in-times-of-no-activity

Conversation

@flonix8

@flonix8 flonix8 commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Description

  • Add optional pull-to-zero decay for flow-based area occupancy: when no flow events are
    observed for a configurable idle period, the count is stepped down gradually to compensate
    for missed "out" events that cause counts to drift upward over time
  • Refactored findFirst... in AreaOccupancyRepository to return the full entity instead
    of just the count, so the timestamp required for decay calculation is available
  • Feature is disabled by default; config keys documented in application.properties

Config

Property Default Description
areaOccupancy.flowIdleDecreaseEnabled false Enable/disable the feature
areaOccupancy.flowIdleDecreaseThreshold 1h Idle gap before decay kicks in
areaOccupancy.flowIdleDecreaseInterval 15m Interval per decay step
areaOccupancy.flowIdleDecreaseFactor 1 Count reduced per step

Motivation and Context

How has this been tested?

  • Unit tests
  • Manual test (on production Valkey stream)

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@flonix8 flonix8 requested a review from ztarbug June 18, 2026 16:14
@flonix8 flonix8 merged commit 30fd7bf into main Jun 19, 2026
2 checks passed
@flonix8 flonix8 deleted the feature/AB#2252-implement-pull-to-zero-in-times-of-no-activity branch June 19, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants